package com.ruoyi.nongjt.mapper;


import com.ruoyi.nongjt.domain.pojo.NjtUserRegister;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

@Mapper
public interface NjtUserRegisterMapper {

    List<NjtUserRegister> selectNjtUserRegisterList(NjtUserRegister njtUserRegister);

    int updateNjtUserRegister(NjtUserRegister njtUserRegister);

    //int deleteNjtUserRegister(Long id);
    int alterNjtUserRegister(Long id);


    NjtUserRegister userLogin(NjtUserRegister njtUserRegister);
    // 根据手机号查询用户（用于登录/注册时判断是否已存在）
    NjtUserRegister getUserByPhone(String phone);

    // 插入新用户
    int insertNjtUserRegister(NjtUserRegister userRegister);

    /**
     * 根据手机号更新监管者密码
     */
    int updatePasswordByPhone(@Param("mobilePhone") String mobilePhone, @Param("newPassword") String newPassword);
}
